'use strict';
import React from 'react';
import {
    View,
    Text,
    Image,
    TouchableOpacity,
    StyleSheet,
} from 'react-native';
import Global from '../Commom/GlobalConst';

const width = Global.Const.size.width;

const styles = StyleSheet.create({
    titleBox: {
        padding: 15,
        flexDirection: 'row',
        alignItems: 'center',
    },
    title: {
        width,
        color: Global.FontColor.DimGray,
        fontSize: 16
    },
    head: {
        flexDirection: 'row',
        paddingLeft: 23,
        marginBottom: 10,
    },
    avatarBox: {
        alignItems: 'center',
        marginRight: 20
    },
    avatarImg: {
        width: 60,
        height: 60,
        borderRadius: 30,
    },
    avatarName: {
        fontSize: 11,
        textAlign: 'center',
        flex: 1,
        color: Global.FontColor.DimGray,
        marginTop: 5,
    },
    villageDesc: {
        flex: 1,
        textAlign: 'left',
        color: Global.FontColor.DarkGray,
        fontSize: 14,
        lineHeight: 25,
        marginRight: 40,
    },
    icon30: {
        width: 30,
        height: 30,
        margin: 5
    }
});

class VillageHeadSay extends React.Component {

    render() {
        let village_chief=this.props.village_chief;
        return (
            <View style={{alignItems: 'center', backgroundColor: 'white'}}>
                <View style={styles.titleBox}>
                    <Image style={{width: 15,height: 15,marginRight: 10,resizeMode: 'contain'}}
                        source={require('../../Image/icon_gray_head_say.png')}
                    />
                    <Text style={styles.title}>
                        村长说
                    </Text>
                </View>
                <View style={styles.head}>
                    <View style={styles.avatarBox}>
                        <Image
                            source={{uri: village_chief.avatar}}
                            style={styles.avatarImg}/>
                        <Text numberOfLines={1} style={styles.avatarName}>{village_chief.name}</Text>
                    </View>
                    <Text numberOfLines={3} style={styles.villageDesc}>
                        {village_chief.introduce}
                    </Text>
                    {/*<Image source={require('../../Image/arrow.png')} style={styles.icon30}/>*/}
                </View>
            </View>
        )
    }
}

export default VillageHeadSay;